@isTest
private class Test_IntegrationClasses
{
    public static testMethod void methodOne()
    {
        Test.startTest();
        IntegrationUtill.isruntest = true;
             
        Campus__c cmps = new Campus__c(Name = 'Unit Test', Active__c = True);
        cmps.recordTypeId = Schema.sObjectType.Campus__c.getRecordTypeInfosByName().get('ULA - Campus').getRecordTypeId();
        insert cmps;
        
        Program__c prgm = new Program__c(Name = 'Unit Test', Active__c = True);
        prgm.recordTypeId = Schema.sObjectType.Program__c.getRecordTypeInfosByName().get('ULA - Traditional Program').getRecordTypeId();
        insert prgm;
        
        Catalog__c ctlg = new Catalog__c(Catalog_Name__c = 'Unit Test', Active__c = True, 

        Campus__c = cmps.Id, Program__c = prgm.Id);
        ctlg.X3_Payments__c = true;
        ctlg.recordTypeId = Schema.sObjectType.Catalog__c.getRecordTypeInfosByName().get('ULA - Traditional Catalog').getRecordTypeId();
        insert ctlg;
        
        Account acc = new Account();
        acc.LastName = 'Test001';
        acc.FirstName = 'Unit';
        acc.Account_Assigned_Date__c = Date.valueOf('2012-02-27');
        acc.Age_Rage__pc = '24 to 39';
        acc.Birth_Date__c = Date.valueOf('1982-01-03');
        acc.Delegation_or_Municipality__c = 'Benito Juarez';
        acc.Do_Not_Text_Message__pc = false;
        acc.Exterior_Number__c = '10';
        acc.Extra_curricular_activities__c  = 'Soccer';
        acc.Father_s_Email__c = 'jose@father.com';
        acc.Father_s_First_Name__c = 'Jose';
        acc.Father_s_Last_Name__c = 'Gonzalez';
        acc.Gender__pc = 'Male';
        acc.Other_City__c = 'México DF';
        acc.Other_Postal_Code__c = '03100';
        acc.Other_Street__c = 'Porfirio Díaz';
        acc.Personal_Email__pc   = 'pablo@prueba.com';
        acc.PersonEmail = 'pablo@prueba.com';
        acc.PersonMobilePhone = '5598741230';
        acc.Phone = '5598741230';
        acc.Preferred_Email__pc  = 'Personal Email';
        acc.Preferred_Phone__pc = 'Mobile Phone';
        acc.RecordTypeId = Schema.Sobjecttype.Account.getRecordTypeInfosByName().get('ULA - Working Adult Student Account').getRecordTypeId();
        acc.Status__c = 'Prospect';
        insert acc;
        
        Opportunity oppty = new Opportunity();
        oppty.Name= 'Unit Test001';
        oppty.AccountId = acc.Id;
        oppty.RecordTypeId = Schema.Sobjecttype.Opportunity.getRecordTypeInfosByName().get('ULA - Working Adults Layout').getRecordTypeId();
        oppty.Registrant_Type__c = 'High School - Local';
        oppty.StageName = 'Application Started';
        oppty.Campus__c = cmps.Id;
        oppty.Program__c = prgm.Id;
        oppty.Catalog__c = ctlg.Id;
        oppty.Payment_plan__c = '3';
        oppty.CloseDate = Date.valueOf('2012-04-01');
        insert oppty;
        
        Opportunity opp = [Select Id,name from opportunity limit 1];
        Set<String> set_op = new Set<String>();
        set_op.add('Application Submitted-'+opp.id);
        IntegrationUtill.doCalloutEduMxService(set_op,true);
        Test.stopTest();
        
    }
    public static testMethod void testLeadConversions()
    {
        Country__C objCountry = new Country__C (name='United States',Country_Code_2__c='US',Active__c=true,Language_Code__c='EN-US');
        insert objCountry;
        
        Lead l=new Lead();
        l.firstname='John';
        l.HasOptedOutOfEmail=false;
        l.lastname='Coppedge';
        l.Personal_Email__c='john@john.com';
        l.Other_Email__c='john@john.com';
        l.Other_Email_2__c='john@john.com';
        l.status='Appointment';
        l.street='test';
        l.state='CA';
        l.city='santa clara';
        l.postalcode='95051';
        l.country ='US';
        l.Country_of_Birth__c =objCountry.id;
        l.Country_of_Residence__c=objCountry.id;
        l.Appointment_Date__c = System.today().adddays(-50);
        l.Work_Phone__c='(801) 555-5556';
        insert l;
        
        Test.startTest();
        BatchClassOnLead_NoShow obj = new BatchClassOnLead_NoShow();
        ID dbatchprocessid = Database.executeBatch(obj);
         
        
        
          clsSchedule_BatchClassOnLead_NoShow dobj = new clsSchedule_BatchClassOnLead_NoShow();
          String dsch = '0 0 23 * * ?';        
          system.schedule('Create Job D', dsch, dobj);
          
          Test.stopTest();
     }     
}